﻿using System.ComponentModel;
using Micua.Bootstrap;

namespace System.Web.Mvc
{
    public static class HtmlExtension
    {
        /// <summary>
        /// 获取Bootstrap对象
        /// </summary>
        /// <typeparam name="TModel">视图类型</typeparam>
        /// <param name="helper">HtmlHelper</param>
        /// <returns>Bootstrap对象</returns>
        public static Bootstrap<TModel> Bootstrap<TModel>(this HtmlHelper<TModel> helper)
        {
            return new Bootstrap<TModel>(helper);
        }

        /// <summary>
        /// 获取BootstrapAjax对象
        /// </summary>
        /// <typeparam name="TModel">视图类型</typeparam>
        /// <param name="helper">AjaxHelper</param>
        /// <returns>BootstrapAjax对象</returns>
        public static BootstrapAjax<TModel> Bootstrap<TModel>(this AjaxHelper<TModel> helper)
        {
            return new BootstrapAjax<TModel>(helper);
        }
    }
}
